package com.livi.security.model.commom;

public enum ResultCode {
    /* 默认成功 */
    SUCCESS(200, "成功"), LOGIN_SUCCESS(200, "登陆成功"), LOGOUT_SUCCESS(200, "退出成功"),

    /* 默认失败 */
    FAIL(999, "失败"),

    /* 认证错误 */
    AUTH_FAIL(401, "未登录"), ACCOUNT_ERROR(401, "账号或密码错误"), ACCOUNT_DISABLE(401, "账号不可用"), ACCOUNT_LOCKED(401, "账号被锁定"),
    PASSWORD_EXPIRED(401, "密码过期"),

    /* 业务错误 */
    NO_PERMISSION(403, "没有权限");

    private Integer code;
    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
